package com.atguigu.gulimall.product.dao;

import com.atguigu.gulimall.product.entity.SpuInfoEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * spu信息
 * 
 * @author dy
 * @email 1091330089@qq.com
 * @date 2022-08-11 11:06:25
 */
@Mapper
public interface SpuInfoDao extends BaseMapper<SpuInfoEntity> {

    /**
     * @Author dy
     * @Description:  根据spuID 修改为 code
     */
    @Update("update pms_spu_info SET publish_status = #{code},update_time = NOW() where id = #{spuId}")
    void updateSpuStatus(@Param("spuId") Long spuId, @Param("code") int code);
}
